<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<div id="header">
    <img src="${pageContext.request.contextPath}/images/MainBaner.png" alt="" class="roundedCorners"/>
    <div id="title"><a href="${pageContext.request.contextPath}/index"><img src=${pageContext.request.contextPath}<fmt:message key="general.logoImg"/> alt="" /></a></div>
    <div id="login">
        <span id="logIn" class="out">
            <c:choose>                
                <c:when test="${username == 'anonymousUser'}">                   
                    <form name='f' method="POST" action="${pageContext.request.contextPath}/j_spring_security_check" >
                        <table> 
                            <tr>
                                <td><span class="smalText">Login:</span></td>
                                <td><span class="smalText">Password:</span></td>
                            </tr>
                            <tr>
                                <td><input id="j_username" name="j_username" type="text" /></td>
                                <td><input id="j_password" name="j_password" type="password" /></td>
                                <td><input type="submit" id="Login" value="Login" class="button"></td>
                            </tr>                            
                            <tr>
                                <td colspan="3"><a href="${pageContext.request.contextPath}/registration"><fmt:message key="mainPage.logIn"/></a></td>
                            </tr>
                        </table>
                    </form>                       
                </c:when>
                <c:when test="${username != 'anonymousUser'}">
                    <form method="POST" action="${pageContext.request.contextPath}/j_spring_security_logout" >
                        <table>                             
                            <tr>
                                <td>
                                    <span id="logout">
                                    <input type="submit" value="Logout" class="button" />
                                    </span>
                                </td>                
                            </tr>
                        </table>
                    </form> 
                </c:when>                         
            </c:choose>            
        </span>
    </div>
</div>
